#!/bin/bash
#
# ==========================================================
GA_HOME=/share/apps/ga
GA_BUILD=${GA_HOME}/build
GA_CLASSDIR=${GA_BUILD}/classes
GA_WORKDIR=${GA_HOME}/work
GA_SRCTOP=${GA_WORKDIR}/src
GA_TESTSRCTOP=${GA_WORKDIR}/src/test
GA_WORKSRCTOP=${GA_WORKDIR}/src/work
LIBROOT=${GA_HOME}/lib
JGAP_LIB=${LIBROOT}/jgap

JAVAC=${JAVA_HOME}/bin/javac
JAVA=${JAVA_HOME}/bin/java
JAR=${JAVA_HOME}/bin/jar

TESTSOURCES="${GA_TESTSRCTOP}/*.java"

WORKSOURCES="${GA_WORKSRCTOP}/*.java \
${GA_WORKSRCTOP}/topo/*.java"


# ==========================================================
CP="${LIBROOT}/mpj.jar:${LIBROOT}/jgap.jar:\
${JGAP_LIB}/appframework-1.0.3.jar:\
${JGAP_LIB}/commons-cli-1.0.jar:\
${JGAP_LIB}/commons-codec-1.3.jar:\
${JGAP_LIB}/commons-lang-2.1.jar:\
${JGAP_LIB}/jcgrid.jar:\
${JGAP_LIB}/jcommon-1.0.14.jar:\
${JGAP_LIB}/jeksparser.jar:\
${JGAP_LIB}/jfreechart-1.0.11.jar:\
${JGAP_LIB}/junit3.8.1.jar:\
${JGAP_LIB}/junit-addons-1.4.jar:\
${JGAP_LIB}/log4j.jar:\
${JGAP_LIB}/swing-layout-1.0.3.jar:\
${JGAP_LIB}/swing-worker-1.1.jar:\
${JGAP_LIB}/TableLayout.jar:\
${JGAP_LIB}/trove-2.0.2.jar:\
${JGAP_LIB}/xpp3_min-1.1.3.4.O.jar:\
${JGAP_LIB}/commons-math-2.0.jar:\
${JGAP_LIB}/colt.jar:\
${JGAP_LIB}/concurrent.jar:\
${JGAP_LIB}/commons-math-2.0.jar:\
${JGAP_LIB}/xstream-1.2.2.jar:\
${LIBROOT}/pico/picocontainer-2.9.jar"

echo "mpjrun.sh -np 7 -dev niodev -machinesfile ${GA_WORKDIR}/hosts -cp ${CP}:${GA_WORKDIR}/work.jar work.Main"
mpjrun.sh -np 7 -dev niodev -cp ${CP}:${GA_WORKDIR}/work.jar work.Main
#echo "mpjrun.sh -np 7 -dev niodev -cp ${LIBROOT}/mpj.jar:${LIBROOT}/pico/picocontainer-2.9.jar:${GA_WORKDIR}/work.jar work.Main"
#mpjrun.sh -np 7 -dev niodev -cp ${LIBROOT}/mpj.jar:${LIBROOT}/pico/picocontainer-2.9.jar:${GA_WORKDIR}/work.jar work.Main
#-----------------------------------------------------
#-----------------------------------------------------
#
#
#
#${JAVA} -cp ${CP}:${GA_WORKDIR}/work.jar work.Main
